<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html>
<html lang="zh">
<head>
<base href="<%=basePath%>">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>简约书评网</title>
<script type="text/javascript" src="js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript">
	function loadLastNovelList(url){
		$("#novelList").empty();
		$("#novelList").load(url);	
	}

</script>
<link href="css/bootstrap.min.css" rel="stylesheet"/>
<link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.css">
<link rel="stylesheet" href="css/pager.css">
<style type="text/css">
	.row > div {
		margin-bottom: 30px;
	}
</style>

</head>
<body>
<%@include file="/header.jsp" %>
<div class="container">

	 <div class="row">
            <div class="col-lg-12 text-center">
                <div class="input-group">
                    <input type="text" class="form-control" placeholder="输入书名或作者搜索，直接点击按钮查看全部图书" id="condition"/>
                    <span class="input-group-btn">
                        <button class="btn btn-info btn-search" type="button" onclick="queryBookByAuthorOrTitle()"><i class="fa fa-search"></i></button>
                    </span>
                </div><!-- /input-group -->
            </div><!-- /.col-lg-6 -->  
            <br>
     
        </div><!-- /.row -->

        </div>
<div class="container" id="novelList">
	


	<script type="text/javascript" >
		
	</script>
	</div>
</div>

<script src="js/jquery-1.11.0.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery-equal-height.min.js"></script>
<script type="text/javascript">
	function equal_height() {
		// Equal Card Height
		$('.jQueryEqualHeight1').jQueryEqualHeight();

		// Equal Card Height and Text Height
		$('.jQueryEqualHeight2').jQueryEqualHeight('.card .card-body .card-text');
		$('.jQueryEqualHeight2').jQueryEqualHeight('.card');

		// Equal Card Height, Text Height and Title Height
		$('.jQueryEqualHeight3').jQueryEqualHeight('.card .card-body .card-title');
		$('.jQueryEqualHeight3').jQueryEqualHeight('.card .card-body .card-text');
		$('.jQueryEqualHeight3').jQueryEqualHeight('.card');
	}
	$(window).on('load', function(event) {
		equal_height();
	});
	$(window).resize(function(event) {
		equal_height();
	});
	
	function queryBookByAuthorOrTitle(){
		let condition = document.getElementById('condition').value;
		window.location.href="book/queryBookByAuthorOrTitle?condition="+condition+"&pager.offset=0&pageSize=12";
		
	}
	
		loadLastNovelList("book/allBooksForIndex?pager.offset=0");
		
		
		
		

</script>
<%@ include file="footer.jsp" %>

</body>
</html>
